home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
dbus.postinst
< prev
next >
Wrap
Text File
|
2008-10-07
|
2KB
|
61 lines
#!/bin/sh
# Copyright © 2003 Colin Walters <walters@debian.org>
# Copyright © 2006 Sjoerd Simons <sjoerd@debian.org>
set -e
MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus
LAUNCHER=/lib/dbus-1.0/dbus-daemon-launch-helper
if [ "$1" = configure ]; then
adduser --system \
--home "$MESSAGEHOME" \
--no-create-home \
--disabled-password \
--group "$MESSAGEUSER"
chown "$MESSAGEUSER":"$MESSAGEUSER" "$MESSAGEHOME"
if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then
chown root:"$MESSAGEUSER" "$LAUNCHER"
chmod 4754 "$LAUNCHER"
fi
fi
# update init script symlinks for new runlevels and priorities for upgrades
# from older versions
if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.1.20-1; then
echo "Reinstalling init script for new runlevels and priorities ..." >&2
# remove old init script symlinks; dh_installinit adds the proper
# update-rc.d snippet later on
update-rc.d -f dbus remove >/dev/null
fi
if [ "$1" = configure ] && [ -n "$2" ] && [ -x "/etc/init.d/dbus" ]; then
# Do not restart dbus on upgrades, only on fresh installations.
# (dh_installinit -r creates a start action)
# But do reload it so the machine-id can be generated
if [ -e /var/run/dbus/pid ] &&
ps --no-heading -p $(cat /var/run/dbus/pid) > /dev/null; then
# trigger an update notification which recommends to reboot
[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true
invoke-rc.d dbus reload || true
exit 0
fi
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/dbus" ]; then
update-rc.d dbus start 12 2 3 4 5 . stop 88 1 . >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d dbus start || exit $?
else
/etc/init.d/dbus start || exit $?
fi
fi
# End automatically added section